import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'

// const index = ()=> import('../App.vue') 
const Home = () => import('../views/home/Home.vue')
const Community = () => import('../views/community/Community.vue')
const Mine = () => import('../views/mine/Mine.vue')
const ClockDetail = () => import('../views/clockDetail/clockDetail.vue')
const MinePublish = () => import('../views/mine/minePublish.vue')
const Mineinfo = () => import('../views/mine/Mineinfo.vue')
const Achievement = () => import('../views/mine/achievement.vue')
const Publish = () => import('../views/publish/publish.vue')
const PublishDetail = () => import('../views/publish/publishDetail.vue')
const PunchClock = () => import('../views/punchClock/punchClock.vue')

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect:"/home"
  },
  {
    path: '/home',
    // name: 'Home',
    component: Home
  },
  {
    path: '/community',
    name: 'Community',
    component: Community
  },
  {
    path: '/mine',
    name: 'Mine',
    component: Mine,
  },
  {
    path: '/minepublish',
    name: 'MinePublish',
    component: MinePublish,
  },
  {
    path: '/myinfo',
    name: 'Mineinfo',
    component: Mineinfo,
  },
  {
    path: '/clockdetail',
    name: 'ClockDetail',
    component: ClockDetail
  },
  {
    path: '/achievement',
    name: 'Achievement',
    component: Achievement
  },
  {
    path: '/publish',
    name: 'Publish',
    component: Publish,
      
  },
  {
    path: '/publishdetail',
    name: 'PublishDetail',
    component: PublishDetail
},
  {
    path: '/punchClock',
    name: 'PunchClock',
    component: PunchClock
  },
]
const routerHistory = createWebHashHistory()
const router = createRouter({
  history: routerHistory,
  routes
})
export default router
